#include <signal.h>
#include <sys/types.h>
#include <unistd.h>

#include <iostream>
#include <string>
using namespace std;

// 运行用法为
/*
    ./mykill signum pid
       0       1      2
        一共3个 argc = 3
*/

void Usage(string proc) {
  cout << "usage:\n\t" << proc << " signum pid" << endl << endl;
}

int main(int argc, char* argv[]) {
  if (argc != 3) {
    Usage(argv[0]);
    exit(3);
  }
  int signum = stoi(argv[1]);
  int pid = stoi(argv[2]);
  kill(pid, signum);
  return 0;
}